
import { computed, ref, reactive } from 'vue';
import { Pagination } from '@/types/global';
import type { TableColumnData, TableData } from '@arco-design/web-vue/es/table/interface';

const queryModel: any = {
  applicationCode: '',
  applicationName: '',
  applicationGroup: ''
};

export const formModel = ref(queryModel);

export const pagination: Pagination = reactive({
  current: 1,
  pageSize: 20,
});

export const columns = computed<TableColumnData[]>(() => [
  {
    title: '编号',
    dataIndex: 'applicationId',
  },
  {
    title: '应用代码',
    dataIndex: 'applicationCode',
  },
  {
    title: '应用名称',
    dataIndex: 'applicationName',
  },
  {
    title: '应用分组',
    dataIndex: 'applicationGroup',
  },
  {
    title: '创建时间',
    dataIndex: 'creationTime',
  },
  {
    title: '创建人',
    dataIndex: 'creatorName',
  },
  {
    title: '是否可用',
    dataIndex: 'enabled',
    slotName: 'enable',
  },
  {
    title: '操作',
    slotName: 'operations',
    width: 110,
    align: 'center',
  },
]);
